﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using ZaxLib.Web.UI.Events;

namespace DemoControls
{
	public partial class DebugControl : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			if(!IsPostBack)
			{
				lstText.AddItem("Red");
				lstText.AddItem("Green");
				lstText.AddItem("Blue");
			}else
			{
				lblShow.Text = lstText.Text;
			}
		}

		protected void OnChange(Object sender, EventArgs e)
		{
			if(e is ControlEventArgs)
			{
				ControlEventArgs ce = e as ControlEventArgs;
				lblShow.Text = ce.EventData;
			}
		}
	}
}